<div class="section">
        <?php
        $this->widget('AdminManCompMenu', array(
            'comp_id' => $model->id,
            'comp_title' => $model->title,
        ));
        ?>
		<div class="box">
			<div class="title">
				<h2><?=Yii::t('app','Добавление новости')?></h2>
				<span class="hide"></span>
			</div>
<div class="content forms">
    <?$form=$this->beginWidget('CActiveForm', array(
        'id'=>'addnews-form',
        'enableAjaxValidation'=>true,
    )); ?>
    <?=$form->errorSummary($news); ?>

				
					<div class="line" style="border-top-width: 2px; border-top-style: solid; border-top-color: rgb(242, 244, 247); border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(242, 244, 247); ">
						<?=$form->label($news,'title'); ?>
                        <?=CHtml::activeTextField($news,'title',array('class'=>'xl')); ?>
					</div>

                      <div class="line">
                      <?=$form->label($news,'publiced_date'); ?>
                      <?if(strtotime($news->publiced_date)!=null){?>
                           <?=CHtml::activeTextField($news,'publiced_date',array('class'=>'datepicker','value'=>date('d.m.Y',strtotime($news->publiced_date)))); ?>
                      <?} else {?>
                           <?=CHtml::activeTextField($news,'publiced_date',array('class'=>'datepicker','value'=>date('d.m.Y'))); ?>
                      <?}?>
                                        </div>
                    <div class="line">
                       <?=$form->label($news,'is_active'); ?>
                       <input type="checkbox" name="is_active" id="check-1" <?if($news->is_active == 1) echo 'checked';?> />
                       <label for="check-1">Опубликовано</label>

                                        </div>

					
					<div class="line" style="border-top-width: 2px; border-top-style: solid; border-top-color: rgb(242, 244, 247); border-bottom-style: none; border-bottom-width: initial; border-bottom-color: initial; ">
				        <?=$form->label($news,'content_short'); ?>
                        <?=CHtml::activeTextArea($news,'content_short',array('class'=>'xl')); ?>
					</div>

                    <div class="line">
                        <?=$form->label($news,'content'); ?>
                                                <?php //you can use any desired dir to install this extension
 $this->widget('application.extensions.elrtef.elRTE', array(
        'model' => $news,
        'attribute' => 'content',
        //'name' => 'text',
        //'htmlOptions' => array('height' => '600'),
        'options' => array(
                'doctype'=>'js:\'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\'',
                'cssClass' => 'el-rte',
                'cssfiles' => array('css/elrte-inner.css'),
                'absoluteURLs'=>true,
                'allowSource' => true,
                'lang' => 'ru',
                'styleWithCss'=>'',
                'height' => 400,
                'fmAllow'=>true, //if you want to use Media-manager
                'fmOpen'=>'js:function(callback) {$("<div id=\"elfinder\" />").elfinder(%elfopts%);}',//here used placeholder for settings
                'toolbar' => 'maxi',
        ),
        'elfoptions' => array( //elfinder options
            'url'=>'auto',  //if set auto - script tries to connect with native connector
            'passkey'=>'mypass', //here passkey from first connector`s line
            'lang'=>'ru',
            'dialog'=>array('width'=>'900','modal'=>true,'title'=>'Файл-менеджер'),
            'closeOnEditorCallback'=>true,
            'editorCallback'=>'js:callback'
        ),
        )
);
?>
                    </div>

                    <div class="line button">
                                          
                                            <button type="submit" class="green medium"><span><?=(($news_id)?'Сохранить':'Добавить')?></span></button>
                                            <button type="submit" onclick="window.location.replace('<?=$this->createUrl("/mancompanies/adminnews/id/$model->id")?>');return false; " class="blue medium"><span>Отмена</span></button>
                                            
                                        </div>

    <?$this->endWidget(); ?>

			</div>
		</div>
	